home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3161 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: news.ccs.queensu.ca!news
  2. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  3. Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
  4. Subject: Re: C++ with Zapp vs. Delphi
  5. Date: Mon, 22 Jan 1996 12:56:47 GMT
  6. Organization: Queen's University, Kingston
  7. Message-ID: <31038877.2364473@130.15.126.54>
  8. References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <DBk8wg2yqjbB083yn@iaccess.za> <4d7pmb$48c8@tigger.cc.uic.edu> <4dk38h$gdr@merlin.delphi.com> <4dksp1$3d6c@tigger.cc.uic.edu> <30fe666e.3349285@130.15.126.54> <4durk2$2r54@tigger.cc.uic.edu>
  9. NNTP-Posting-Host: free1-slip211.tele.queensu.ca
  10. X-Newsreader: Forte Agent .99c/16.141
  11.  
  12. olczyk@sunphy1 (Constantin Rasinariu) wrote:
  13.  
  14. >Duncan Murdoch (dmurdoch@mast.queensu.ca) wrote:
  15.  
  16. >: There's not a big difference, but I think this is a little bit
  17. >: preferable.  It makes it clear that it's up to the list to know about
  18. >: sorting, not up to the object.  That way you can easily put the same
  19. >: object in multiple lists with different sorting rules.
  20. >Try
  21. >class A:SortedObject (CompareTo not overridden)
  22. >class B: A ( override with first comparison )
  23. >class C: A  (override second comparison )
  24.  
  25. This won't work.  Each object will still have some class, be it B or
  26. C.  It'll end up sorted on one comparison or the other.  What I want
  27. is to have two lists (say AlphaList and NumericList) and put
  28. references to the same object in both lists.  The first would end up
  29. sorted alphabetically, the second numerically.
  30.  
  31.  
  32. >OK. Try this one.
  33. >You have a class, call it model which contains data and a list
  34. >of objects that derive from a 'view' class. Each  'view' class must
  35. >derive from a component. Each view class must received new data as it is 
  36. >modified in model. Model must recieve data from the view class as it
  37. >is changed in the view.
  38. >How do you implement this?
  39.  
  40. I'm sorry, but I'm not sure what you're asking.  Can you state the
  41. problem in more generic terms, without assuming your solution?
  42. Remember, I'm reading this in the Delphi group, and I'm not
  43. particularly familiar with C++ jargon.
  44.  
  45. Duncan
  46.